unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Btnx_1: TButton;
    Btnx_2: TButton;
    procedure Btnx_1Click(Sender: TObject);
    procedure Btnx_2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses
  Math;

{$R *.dfm}

procedure TForm1.Btnx_1Click(Sender: TObject);
var
  DoubA:Double;
  DoubB:Extended;
  BoolA:Boolean;
begin
  DoubA:=8357.20;
  DoubB:=8357.20;

  BoolA:=DoubA <> DoubB;

  if boola then
  begin
    ShowMessage('true');
  end else
  begin
    ShowMessage('false');
  end;
end;

function RoundEx(Value: Extended; RoundMode: TFPURoundingMode = rmUp): Int64;
var
  RM: TFPURoundingMode;
begin
  RM := GetRoundMode;
  try
    SetRoundMode(RoundMode);
    Result := Round(Value);
  finally
    SetRoundMode(RM);
  end;
end;

procedure TForm1.Btnx_2Click(Sender: TObject);
var
  A:Double;
begin
  A:=16.455;

  ShowMessageFmt('%S',[FloatToStrF(A,ffNumber,18,2)]);
  ShowMessageFmt('%f',[SimpleRoundTo(16.455)]);
  ShowMessageFmt('%f',[RoundTo(16.455,-2)]);
  ShowMessageFmt('%d',[RoundEx(16.455)]);
end;

end.
